{extend name="base" /}
{block name="title"}邮件列表{/block}
{block name="main"}
<link rel="stylesheet" href="/static/index/products/style.css">

<div class="swarp">
    <button type="button" class="am-btn am-btn-default am-round"><a href="<?php echo url('add_mail',['prod_id'=>$prod_id]); ?>">添加邮件</a></button>

    <table class="am-table">
        <thead>
        <tr>
            <!--th>#ID</th-->
            <th>所属产品</th>
            <th>客户名称</th>
            <th>邮件类型</th>
            <th>邮件日期</th>
            <!--th>创建时间</th-->
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="data" id="vo"}
        <tr>
            <!--td>{$vo.mail_id}</td-->
            <td>{$vo.prod_id}</td>
            <td>{$vo.name}</td>
            <td><?php echo $mail_type[$vo['type']]; ?></td>
            <td>{$vo.mail_date}</td>
            <!--td>{$vo.create_time}</td-->
            <td><a href="<?php echo url('mails/do_delete',['mail_id'=>$vo['mail_id'],'prod_id'=>$vo['prod_id']]); ?>"><span class="am-badge am-badge-primary">删除</span></a></td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
{/block}
